// GlobalFuncs.h: interface for the GlobalFuncs class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GLOBALFUNCS_H__7C2A14C8_9CE7_4CA0_B14D_4D61604A9349__INCLUDED_)
#define AFX_GLOBALFUNCS_H__7C2A14C8_9CE7_4CA0_B14D_4D61604A9349__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class GlobalFuncs  
{
public:
	static void EnsurePtInRect(CPoint &pt, const CRect &rect)
	{
		if(pt.x < rect.left) 
			pt.x = rect.left;
		else if(pt.x > rect.right) 
			pt.x = rect.right;
		if(pt.y < rect.top) 
			pt.y = rect.top;
		else if(pt.y > rect.bottom)
			pt.y = rect.bottom;
	}
};

#endif // !defined(AFX_GLOBALFUNCS_H__7C2A14C8_9CE7_4CA0_B14D_4D61604A9349__INCLUDED_)
